package com.visionet.waveletData.web.entity.business;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.visionet.waveletData.web.entity.IdEntity;
import com.visionet.waveletData.web.entity.JsonDateSerializer;

/**
 * 用户关注表
 * @author n
 *
 */
@Entity
@Table(name="s_relationship")
public class Relationship extends IdEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private Long userId;	//用户id
	private Long otherUserId;	//被关注用户
	private Date createDate;
	

	
	public Long getUserId() {
		return userId;
	}
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	public Long getOtherUserId() {
		return otherUserId;
	}
	public void setOtherUserId(Long otherUserId) {
		this.otherUserId = otherUserId;
	}
	
	@Column(insertable=false,updatable=false)
	@JsonSerialize(using = JsonDateSerializer.class)
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
}
